﻿package net.wangit.view.element.component;

import net.wangit.Page;
import net.wangit.Row;
import net.wangit.context.ActionContext;
import net.wangit.support.ElementWriter;
import net.wangit.view.element.ElementComponent;

public final class PasswordElement extends ElementComponent {

	private static final ElementWriter writer = new PasswordElementWriter();

	public PasswordElement() {
	}

	protected void configure(Row row1) {
	}

	public String getValue4Validation(String value) {
		int length = value.length();
		StringBuffer result = new StringBuffer();
		for (int i = 0; i < length; i++) {
			result.append("x");
		}
		return result.toString();
	}

	protected ElementWriter getWriter() {
		return writer;
	}

	protected void cloneAfter(ActionContext actioncontext, Page page1) {
	}

}
